/** @file
 *	@brief MAVLink comm protocol generated from fppa.xml
 *	@see http://mavlink.org
 */

#pragma once

#include <array>
#include <cstdint>
#include <sstream>

#ifndef MAVLINK_STX
#define MAVLINK_STX 253
#endif

#include "../message.hpp"

namespace mavlink {
namespace fppa {

/**
 * Array of msg_entry needed for @p mavlink_parse_char() (trought @p mavlink_get_msg_entry())
 */
constexpr std::array<mavlink_msg_entry_t, 39> MESSAGE_ENTRIES {{ {0, 125, 111, 0, 0, 0}, {11, 143, 41, 0, 0, 0}, {12, 105, 185, 0, 0, 0}, {13, 11, 36, 0, 0, 0}, {14, 174, 85, 0, 0, 0}, {15, 165, 72, 0, 0, 0}, {16, 220, 44, 0, 0, 0}, {17, 3, 16, 0, 0, 0}, {18, 204, 44, 0, 0, 0}, {19, 38, 88, 0, 0, 0}, {20, 219, 116, 0, 0, 0}, {21, 196, 112, 0, 0, 0}, {22, 107, 208, 0, 0, 0}, {23, 215, 172, 0, 0, 0}, {24, 156, 148, 0, 0, 0}, {25, 223, 144, 0, 0, 0}, {26, 81, 240, 0, 0, 0}, {27, 158, 240, 0, 0, 0}, {28, 126, 240, 0, 0, 0}, {29, 237, 240, 0, 0, 0}, {30, 138, 240, 0, 0, 0}, {31, 2, 58, 0, 0, 0}, {32, 43, 29, 0, 0, 0}, {33, 169, 154, 0, 0, 0}, {34, 228, 20, 0, 0, 0}, {170, 121, 44, 0, 0, 0}, {171, 252, 112, 0, 0, 0}, {172, 74, 3, 0, 0, 0}, {173, 170, 29, 0, 0, 0}, {174, 58, 30, 0, 0, 0}, {175, 239, 108, 0, 0, 0}, {180, 230, 18, 0, 0, 0}, {200, 28, 30, 0, 0, 0}, {201, 109, 39, 0, 0, 0}, {202, 163, 25, 0, 0, 0}, {203, 233, 27, 0, 0, 0}, {250, 183, 32, 0, 0, 0}, {251, 76, 109, 0, 0, 0}, {255, 119, 140, 0, 0, 0} }};

//! MAVLINK VERSION
constexpr auto MAVLINK_VERSION = 2;


// ENUM DEFINITIONS


/** @brief  */
enum class MAV_STATE : uint8_t
{
    UNINIT=0, /* Uninitialized system, state is unknown. | */
    BOOT=1, /* System is booting up. | */
    CALIBRATING=2, /* System is calibrating and not flight-ready. | */
    STANDBY=3, /* System is grounded and on standby. It can be launched any time. | */
    ACTIVE=4, /* System is active and might be already airborne. Motors are engaged. | */
    CRITICAL=5, /* System is in a non-normal flight mode. It can however still navigate. | */
    EMERGENCY=6, /* System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down. | */
    POWEROFF=7, /* System just initialized its power-down sequence, will shut down now. | */
};

//! MAV_STATE ENUM_END
constexpr auto MAV_STATE_ENUM_END = 8;

/** @brief  */
enum class MAN_CTRL_COM_MODE : uint8_t
{
    MCCM_DYNAMIC=0, /* dynamic communication. | */
    MCCM_STATIC=1, /* static communication. | */
};

//! MAN_CTRL_COM_MODE ENUM_END
constexpr auto MAN_CTRL_COM_MODE_ENUM_END = 2;

/** @brief  */
enum class MAN_CTRL_CTRL_MODE : uint8_t
{
    MCCM_ABSOLUTE=0, /* absolute beam attitude. | */
    MCCM_RELATIVE=1, /* relative beam attitude. | */
};

//! MAN_CTRL_CTRL_MODE ENUM_END
constexpr auto MAN_CTRL_CTRL_MODE_ENUM_END = 2;

/** @brief  */
enum class AUTO_TRACE_BEACON_MODE
{
    ATBM_DVB=0, /* dvb. | */
    ATBM_BEACON=1, /* beacon. | */
    ATBM_RADIO=2, /* radio. | */
};

//! AUTO_TRACE_BEACON_MODE ENUM_END
constexpr auto AUTO_TRACE_BEACON_MODE_ENUM_END = 3;

/** @brief  */
enum class AUTO_TRACE_GPS_MODE : uint8_t
{
    ATGM_AUTO=0, /* Get gps information by auto. | */
    ATGM_MANUAL=1, /* Get gps information by manual. | */
};

//! AUTO_TRACE_GPS_MODE ENUM_END
constexpr auto AUTO_TRACE_GPS_MODE_ENUM_END = 2;

/** @brief  */
enum class AUTO_TRACE_POLAR_TYPE
{
    ATPT_LEFT=0, /* left polar. | */
    ATPT_RIGHT=1, /* right polar. | */
};

//! AUTO_TRACE_POLAR_TYPE ENUM_END
constexpr auto AUTO_TRACE_POLAR_TYPE_ENUM_END = 2;

/** @brief  */
enum class BEACON_REQUEST_CMD_E : uint8_t
{
    BRCE_SET_DVB=0, /* set the dvb params. | */
    BRCE_SET_BEACON=1, /* set the beacon params. | */
    BRCE_SET_RADIO=2, /* set the radio params. | */
    BRCE_GET_DVB=3, /* get the dvb params. | */
    BRCE_GET_BEACON=4, /* get the beacon params. | */
    BRCE_GET_RADIO=5, /* get the radio params. | */
    BRCE_GET_SEARCH_TIME=6, /* get the dvb search time. | */
    BRCE_GET_STATUS=7, /* get the dvb status. | */
    BRCE_GET_INFO=8, /* get the dvb information. | */
};

//! BEACON_REQUEST_CMD_E ENUM_END
constexpr auto BEACON_REQUEST_CMD_E_ENUM_END = 9;

/** @brief  */
enum class BUC_REQUEST_CMD_E : uint8_t
{
    BRCE_SET_SW=0, /* set the switch. | */
    BRCE_SET_ATT=1, /* set the attenuation. | */
    BRCE_SET_LO=2, /* set the local oscillator. | */
    BRCE_GET_SW=3, /* get the switch status. | */
    BRCE_GET_ATT=4, /* get the attenuation. | */
    BRCE_GET_LO=5, /* get the local oscillator. | */
    BRCE_GET_POWER=6, /* get the output power. | */
    BRCE_GET_TEMP=7, /* get the temperature. | */
    BRCE_GET_GAIN=8, /* get the gain. | */
};

//! BUC_REQUEST_CMD_E ENUM_END
constexpr auto BUC_REQUEST_CMD_E_ENUM_END = 9;

/** @brief  */
enum class SATS_REQUEST_CMD_E : uint8_t
{
    SRC_ADD=1, /*  add the satellite. | */
    SRC_DELETE=2, /*  delete the satellite. | */
    SRC_UPDATE=3, /*  update the satellite. | */
    SRC_QUERY=4, /*  query the satellite. | */
};

//! SATS_REQUEST_CMD_E ENUM_END
constexpr auto SATS_REQUEST_CMD_E_ENUM_END = 5;

/** @brief  */
enum class ATTITUDE_CONTROLLER_MODE : uint8_t
{
    AC_MODE_INIT=0, /* Attitude controller is booting up. | */
    AC_MODE_SEARCH_HOME=1, /* Antenna begin to serach home. | */
    AC_MODE_WAIT_COMPLETED=2, /* Waiting for search home completed. | */
    AC_MODE_SEARCH_COMPLETED=3, /* Antenna serach home completed. | */
    AC_MODE_SYNC_PARAMS=4, /* Synchronizing paramemters. | */
    AC_MODE_RUN=10, /* Attitude controller in run-time. | */
    AC_MODE_RUN_ATTITUDE_CTRL=11, /* System is working in attitude control mode. | */
    AC_MODE_RUN_TILTHOLD_CTRL=12, /* System is working in tilthold control mode. | */
    AC_MODE_STOP=20, /* Attitude controller stop. | */
    AC_MODE_IDLE=30, /* Attitude controller is idle. | */
    AC_MODE_IDLE_WAIT_CMD=31, /* System is idle,and waiting for command. | */
    AC_MODE_IDLE_SYS_ERR=32, /* System is idle,and incur a error. | */
};

//! ATTITUDE_CONTROLLER_MODE ENUM_END
constexpr auto ATTITUDE_CONTROLLER_MODE_ENUM_END = 33;

/** @brief  */
enum class SATELLITE_TRACKER_MODE : uint8_t
{
    ST_MODE_INIT=0, /* Staellite tracker is booting up. | */
    ST_MODE_INIT_SYNC_PARAMS=1, /* Synchronizing paramemters. | */
    ST_MODE_INIT_WAIT_ATTI=2, /* Waiting for attitude controller ready. | */
    ST_MODE_INIT_COMPLETED=3, /* Staellite tracker is ready. | */
    ST_MODE_RUN=10, /* System is working run-time. | */
    ST_MODE_RUN_SCANNING=11, /* Start signal scan at now. | */
    ST_MODE_RUN_RESCANNING=12, /* Restart signal scan. | */
    ST_MODE_RUN_OPTIMIZING=13, /* Scan Optimized signal. | */
    ST_MODE_STOP=20, /* Stop tracker. | */
    ST_MODE_IDLE=30, /* Stop tracker. | */
    ST_MODE_IDLE_WAIT_CMD=31, /* System is idle,and waiting for command. | */
    ST_MODE_IDLE_SYS_ERR=32, /* System is idle,and incur a error. | */
};

//! SATELLITE_TRACKER_MODE ENUM_END
constexpr auto SATELLITE_TRACKER_MODE_ENUM_END = 33;

/** @brief  */
enum class SATELLITE_TRACKER_REQUEST
{
    REQUEST_SAT_STOM=0, /* Invalid request. | */
    REQUEST_SCAN_SAT_STOM_ORBIT=1, /* Scan target satellite with orbit. | */
    REQUEST_SET_SAT_STOM_TARGET=2, /* Set target satellite with angle. | */
    REQUEST_SAT_SITS=10, /* Invalid request. | */
    REQUEST_RESCAN_SAT_SITS_ORBIT=11, /* Restart signal scan. | */
    REQUEST_SCAN_SAT_SITS_ORBIT=12, /* Start signal scan at now. | */
    REQUEST_SET_SAT_SITS_TARGET=13, /* Set target satellite with angle. | */
    REQUEST_SWAP_STOP=20, /* Stop tracker. | */
    REQUEST_SWAP_IDLE=30, /* Invalid request. | */
    REQUEST_SWAP_IDLE_WAIT_CMD=31, /* Swap to idle,and waiting for command. | */
};

//! SATELLITE_TRACKER_REQUEST ENUM_END
constexpr auto SATELLITE_TRACKER_REQUEST_ENUM_END = 32;


} // namespace fppa
} // namespace mavlink

// MESSAGE DEFINITIONS
#include "./mavlink_msg_heartbeat.hpp"
#include "./mavlink_msg_motor_status.hpp"
#include "./mavlink_msg_attitude_body.hpp"
#include "./mavlink_msg_attitude_beam_target.hpp"
#include "./mavlink_msg_attitude_beam.hpp"
#include "./mavlink_msg_raw_imu.hpp"
#include "./mavlink_msg_rtk_gps.hpp"
#include "./mavlink_msg_humiture.hpp"
#include "./mavlink_msg_beacon_power.hpp"
#include "./mavlink_msg_pricise_imu.hpp"
#include "./mavlink_msg_attitude_body_data.hpp"
#include "./mavlink_msg_attitude_body_debug.hpp"
#include "./mavlink_msg_kalman_data_x.hpp"
#include "./mavlink_msg_kalman_data_z.hpp"
#include "./mavlink_msg_att_body_data.hpp"
#include "./mavlink_msg_att_body_debug.hpp"
#include "./mavlink_msg_kf_xk_p1.hpp"
#include "./mavlink_msg_kf_xk_p2.hpp"
#include "./mavlink_msg_kf_p0q.hpp"
#include "./mavlink_msg_kf_zk.hpp"
#include "./mavlink_msg_kf_other.hpp"
#include "./mavlink_msg_tracker_status.hpp"
#include "./mavlink_msg_buc_status.hpp"
#include "./mavlink_msg_gnss_data.hpp"
#include "./mavlink_msg_fo_gyro.hpp"
#include "./mavlink_msg_beacon_request.hpp"
#include "./mavlink_msg_beacon_response.hpp"
#include "./mavlink_msg_mavlink_comm_ctrl.hpp"
#include "./mavlink_msg_buc_request.hpp"
#include "./mavlink_msg_buc_response.hpp"
#include "./mavlink_msg_sats_request.hpp"
#include "./mavlink_msg_motor_ctrl.hpp"
#include "./mavlink_msg_manual_control.hpp"
#include "./mavlink_msg_auto_trace.hpp"
#include "./mavlink_msg_downlink_params.hpp"
#include "./mavlink_msg_uplink_params.hpp"
#include "./mavlink_msg_reserve_debug.hpp"
#include "./mavlink_msg_adrc_tuning.hpp"
#include "./mavlink_msg_pid_tuning.hpp"

// base include

